home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 December / PCWorld_2004-12_cd.bin / software / temacd / tiny / tf6pro-6[1].0.140.exe / Tiny Firewall Pro 6.0.msi / ws_device.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-29  |  12.9 KB  |  227 lines

  1. ∩╗┐<?xml version="1.0"?>
  2. <!--
  3. ========================================================================
  4. filename:        ws_device.xsl
  5. copyright(c):    Tiny Software corp 2004 (http://www.tinysoftware.com)
  6. author:            Petr Soukup
  7. ========================================================================
  8. -->
  9.  
  10. <xsl:stylesheet
  11.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
  12.  
  13. <!--
  14. ************************************************************************
  15.     INCLUDE SECTION
  16. ************************************************************************
  17. -->
  18.  
  19. <!--=================================================================-->
  20.     <xsl:template match="/">
  21. <!--=================================================================-->
  22.         <xsl:apply-templates select="/SecDb/RuleList"/>
  23.     </xsl:template>
  24.  
  25. <!--=================================================================-->
  26.     <xsl:template match="RuleList">
  27. <!--=================================================================-->
  28.         <p>
  29.             <b>Audit level for Prevented access: </b>
  30.             <select id="SelAuditLevel" onchange="changeAuditLevel()">
  31.                 <xsl:choose>
  32.                     <xsl:when test="Rule[@ot='Device' and AccessDesc/@ar='Prevent' and AccessDesc/@al='Ignore']">
  33.                         <option value="monitor">Monitor</option>
  34.                         <option value="ignore" selected="selected">Ignore</option>
  35.                     </xsl:when>
  36.                     <xsl:otherwise>
  37.                         <option value="monitor" selected="selected">Monitor</option>
  38.                         <option value="ignore">Ignore</option>
  39.                     </xsl:otherwise>
  40.                 </xsl:choose>
  41.             </select>
  42.         </p>
  43.         <p>
  44.             <b>Prevent access to the following devices:</b>
  45.             <ul class="DeviceControl">
  46.                 <li>
  47.                     <xsl:element name="input">
  48.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  49.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  50.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  51.                         <xsl:if test="Rule[@ot='Device' and Object='Tcpip\DevN\*\RawIp' and AccessDesc/@ar='Prevent']">
  52.                             <xsl:attribute name="checked">checked</xsl:attribute>
  53.                         </xsl:if>
  54.                         <xsl:attribute name="objects">Tcpip\DevN\*\RawIp|Tcpip\DevN\*\IPMULTICAST|Tcpip\DevN\*\Ip|Ndisuio\DevN\*\</xsl:attribute>
  55.                         <xsl:attribute name="rules">
  56.                             <xsl:for-each select="Rule[@ot='Device' and (Object='Tcpip\DevN\*\RawIp' or Object='Tcpip\DevN\*\IPMULTICAST' or Object='Tcpip\DevN\*\Ip' or Object='Ndisuio\DevN\*\')]">
  57.                                 <xsl:value-of select="@id"/>
  58.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  59.                             </xsl:for-each>
  60.                         </xsl:attribute>
  61.                     </xsl:element>
  62.                     <xsl:text>Raw IP packets (except Trusted applications)</xsl:text>
  63.                 </li>
  64.  
  65.                 <li>
  66.                     <xsl:element name="input">
  67.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  68.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  69.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  70.                         <xsl:if test="Rule[@ot='Device' and Object='Disk\Link\*\usbstor*' and AccessDesc/@ar='Prevent']">
  71.                             <xsl:attribute name="checked">checked</xsl:attribute>
  72.                         </xsl:if>
  73.                         <xsl:attribute name="objects">Disk\Link\*\usbstor*</xsl:attribute>
  74.                         <xsl:attribute name="rules">
  75.                             <xsl:for-each select="Rule[@ot='Device' and (Object='Disk\Link\*\usbstor*')]">
  76.                                 <xsl:value-of select="@id"/>
  77.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  78.                             </xsl:for-each>
  79.                         </xsl:attribute>
  80.                     </xsl:element>
  81.                     <xsl:text>USB drives</xsl:text>
  82.                 </li>
  83.  
  84.                 <li>
  85.                     <xsl:element name="input">
  86.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  87.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  88.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  89.                         <xsl:if test="Rule[@ot='Device' and (Object='Disk\Link\*\Sbp2*') and AccessDesc/@ar='Prevent']">
  90.                             <xsl:attribute name="checked">checked</xsl:attribute>
  91.                         </xsl:if>
  92.                         <xsl:attribute name="objects">Disk\Link\*\Sbp2*</xsl:attribute>
  93.                         <xsl:attribute name="rules">
  94.                             <xsl:for-each select="Rule[@ot='Device' and (Object='Disk\Link\*\Sbp2*')]">
  95.                                 <xsl:value-of select="@id"/>
  96.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  97.                             </xsl:for-each>
  98.                         </xsl:attribute>
  99.                     </xsl:element>
  100.                     <xsl:text>FireWire Drives</xsl:text>
  101.                 </li>
  102.  
  103.                 <li>
  104.                     <xsl:element name="input">
  105.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  106.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  107.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  108.                         <xsl:if test="Rule[@ot='Device' and Object='*\Link\Modem\*' and AccessDesc/@ar='Prevent']">
  109.                             <xsl:attribute name="checked">checked</xsl:attribute>
  110.                         </xsl:if>
  111.                         <xsl:attribute name="objects">*\Link\Modem\*</xsl:attribute>
  112.                         <xsl:attribute name="account">system</xsl:attribute>
  113.                         <xsl:attribute name="rules">
  114.                             <xsl:for-each select="Rule[@ot='Device' and Object='*\Link\Modem\*']">
  115.                                 <xsl:value-of select="@id"/>
  116.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  117.                             </xsl:for-each>
  118.                         </xsl:attribute>
  119.                     </xsl:element>
  120.                     <xsl:text>Modems</xsl:text>
  121.                 </li>
  122.  
  123.                 <li>
  124.                     <xsl:element name="input">
  125.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  126.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  127.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  128.                         <xsl:if test="Rule[@ot='Device' and (Object='irda\DevN\*\' or Object='*\Link\Infrared\*') and AccessDesc/@ar='Prevent']">
  129.                             <xsl:attribute name="checked">checked</xsl:attribute>
  130.                         </xsl:if>
  131.                         <xsl:attribute name="objects">irda\DevN\*\|*\Link\Infrared\*</xsl:attribute>
  132.                         <xsl:attribute name="account">system</xsl:attribute>
  133.                         <xsl:attribute name="rules">
  134.                             <xsl:for-each select="Rule[@ot='Device' and (Object='irda\DevN\*\' or Object='*\Link\Infrared\*')]">
  135.                                 <xsl:value-of select="@id"/>
  136.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  137.                             </xsl:for-each>
  138.                         </xsl:attribute>
  139.                     </xsl:element>
  140.                     <xsl:text>Infrared</xsl:text>
  141.                 </li>
  142.  
  143.                 <li>
  144.                     <xsl:element name="input">
  145.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  146.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  147.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  148.                         <xsl:if test="Rule[@ot='Device' and Object='*\Link\Ports\*' and AccessDesc/@ar='Prevent']">
  149.                             <xsl:attribute name="checked">checked</xsl:attribute>
  150.                         </xsl:if>
  151.                         <xsl:attribute name="objects">*\Link\Ports\*</xsl:attribute>
  152.                         <xsl:attribute name="account">system</xsl:attribute>
  153.                         <xsl:attribute name="rules">
  154.                             <xsl:for-each select="Rule[@ot='Device' and Object='*\Link\Ports\*']">
  155.                                 <xsl:value-of select="@id"/>
  156.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  157.                             </xsl:for-each>
  158.                         </xsl:attribute>
  159.                     </xsl:element>
  160.                     <xsl:text>Serial and parallel ports</xsl:text>
  161.                 </li>
  162.  
  163.                 <li>
  164.                     <xsl:element name="input">
  165.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  166.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  167.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  168.                         <xsl:if test="Rule[@ot='Device' and Object='*\Link\FloppyDisk\*' and AccessDesc/@ar='Prevent']">
  169.                             <xsl:attribute name="checked">checked</xsl:attribute>
  170.                         </xsl:if>
  171.                         <xsl:attribute name="objects">*\Link\FloppyDisk\*</xsl:attribute>
  172.                         <xsl:attribute name="account">system</xsl:attribute>
  173.                         <xsl:attribute name="rules">
  174.                             <xsl:for-each select="Rule[@ot='Device' and Object='*\Link\FloppyDisk\*']">
  175.                                 <xsl:value-of select="@id"/>
  176.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  177.                             </xsl:for-each>
  178.                         </xsl:attribute>
  179.                     </xsl:element>
  180.                     <xsl:text>Floppy disks</xsl:text>
  181.                 </li>
  182.  
  183.                 <li>
  184.                     <xsl:element name="input">
  185.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  186.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  187.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  188.                         <xsl:if test="Rule[@ot='Device' and Object='*\Link\CDROM\*' and AccessDesc/@ar='Prevent']">
  189.                             <xsl:attribute name="checked">checked</xsl:attribute>
  190.                         </xsl:if>
  191.                         <xsl:attribute name="objects">*\Link\CDROM\*</xsl:attribute>
  192.                         <xsl:attribute name="account">system</xsl:attribute>
  193.                         <xsl:attribute name="rules">
  194.                             <xsl:for-each select="Rule[@ot='Device' and Object='*\Link\CDROM\*']">
  195.                                 <xsl:value-of select="@id"/>
  196.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  197.                             </xsl:for-each>
  198.                         </xsl:attribute>
  199.                     </xsl:element>
  200.                     <xsl:text>CD-ROMS</xsl:text>
  201.                 </li>
  202.  
  203.                 <li>
  204.                     <xsl:element name="input">
  205.                         <xsl:attribute name="type">checkbox</xsl:attribute>
  206.                         <xsl:attribute name="name">checkDevicesCtrl</xsl:attribute>
  207.                         <xsl:attribute name="onclick">changeRules(this)</xsl:attribute>
  208.                         <xsl:if test="Rule[@ot='Device' and Object='DangerousIoctl\*' and @app='*' and AccessDesc/@ar='Prevent']">
  209.                             <xsl:attribute name="checked">checked</xsl:attribute>
  210.                         </xsl:if>
  211.                         <xsl:attribute name="objects">DangerousIoctl\*</xsl:attribute>
  212.                         <xsl:attribute name="rules">
  213.                             <xsl:for-each select="Rule[@ot='Device' and  Object='DangerousIoctl\*' and @app='*']">
  214.                                 <xsl:value-of select="@id"/>
  215.                                 <xsl:if test="position()!=last()"><xsl:text>|</xsl:text></xsl:if> 
  216.                             </xsl:for-each>
  217.                         </xsl:attribute>
  218.                     </xsl:element>
  219.                     <xsl:text>Dangerous Disk Control ΓÇô format, mountΓǪ (except Trusted applications)</xsl:text>
  220.                 </li>
  221.             </ul>
  222.         </p>
  223.  
  224.     </xsl:template>
  225.  
  226. </xsl:stylesheet>
  227.